<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
	<title>批量日报管理</title>
	<script type="text/javascript" src="../../js/boot.js"></script>
</head>

<body>
	<form id="upload" action="upload.aspx" method="post" enctype="multipart/form-data">
		文件：<input type="file" name="photo" id="photo" value="" placeholder="免冠照片">
		<br />
		<input type="button" onclick="postData();" value="上传" style="width:100px;height:30px;">
	</form>
</body>
<script type="text/javascript">
	mini.parse();

	function setData(data) {
	}

	var data = null;

	function getData() {
		return data;
	}

	function postData() {
		var formData = new FormData();
		formData.append("photo", $("#photo")[0].files[0]);
		formData.append("service", 'App.Passion.UploadFile');
		$.ajax({
			url: http.getUrl("/file/upload.do"), /*接口域名地址*/
			type: 'post',
			data: formData,
			contentType: false,
			processData: false,
			success: function (page) {
				data = page.data;
				// debugger
				CloseWindow("ok");
			}
		})
	}

	function CloseWindow(action) {
		if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
		else window.close();
	}

	function onOk() {
		CloseWindow("ok");
	}

	function onCancel() {
		CloseWindow("cancel");
	}

</script>

</html>